import { http } from '@/utils/http'

export function usePmUserApi() {
  return {
    listSimpleUsers(query?: Record<string, any>) {
      return http.get<UserForm[]>('/prod-api/admin-api/system/user/listAll', query)
    },
    // 切换子账号
    switchAccountByUsername(data?: Record<string, any>) {
      return http.post('/prod-api/admin-api/system/auth/switchAccount', data)
    },
    // 获取子账号信息
    getUserShareInfo() {
      return http.get('/prod-api/admin-api/system/auth/switchAccount/share')
    },
    getUserDetailInfo() {
      return http.get<PmUserDetailInfo>('/prod-api/admin-api/system/user/profile/get')
    }
  }
}
